package trycatch.estudo;
import java.io.FileNotFoundException;
import java.io.IOException;

public class TestaException {

	double saldo = 4000;
	double saca;
	
	
	public double sacaDinheiro( int saca) throws ValorInvalidoException{
		
			if( saca > this.saldo){
				throw new ValorInvalidoException(saca);
			}
			else{
				return this.saldo -= saca;
			}
	}
	
	
}
